import {INCREMENTCOUNT,DECREMENTCOUNT} from '../constant/countConst'
import store from '../store'
export const incrementAction = (data =1)=>{
    return {
        type:INCREMENTCOUNT,
        data:1
    }
}

export const decrementAction = (data=1)=>{
    return {
        type:DECREMENTCOUNT,
        data:1
    }
}
export const waitDecrementAction =(data)=>{

    return ()=>{
        setTimeout(()=>{
            store.dispatch({
                type:INCREMENTCOUNT,
                data
            })
        },2000)
    }
}